class CreateUsers < ActiveRecord::Migration[5.1]
  def change
    create_table :users do |t|
      t.string :name, comment: '用户姓名'
      t.string :login, comment: '用户登录名'
      t.string :password, comment: '密码'
      t.string :mobile, comment: '手机'
      t.boolean :active, default: 1, comment: '是否启用', index: true
      t.boolean :gender, comment: '性别', index: true
      t.string :avatar_url, comment: '用户头像'

      t.timestamps
    end
  end
end
